import 'dart:async';

import 'package:macros/macros.dart';

import 'impl.dart';

macro class MyMacro implements ClassDeclarationsMacro {
  const MyMacro();

  @override
  FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
      MemberDeclarationBuilder builder) {
    // TODO: implement buildDeclarationsForClass
    throw UnimplementedError();
  }

// ...
}

macro class ClassTypesDeclareTypeA implements ClassTypesMacro {


  const ClassTypesDeclareTypeA();

  @override
  Future<void> buildTypesForClass(ClassDeclaration clazz,
      ClassTypeBuilder builder) async {
    builder.declareType(
        '${clazz.identifier.name}Repo', await builder.code(
        'class ${clazz.identifier
            .name}Repo { `int` get x => 3; `String` get y => "123123";}'));
  }
}